package com.wanmait.heating.service.impl;

import com.github.pagehelper.PageInfo;
import com.wanmait.heating.mapper.SuperMapper;
import com.wanmait.heating.pojo.Super;
import com.wanmait.heating.service.SuperService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class)
public class SuperServiceImpl implements SuperService {

    @Resource
    private SuperMapper superMapper;

    @Override
    public void insert(Super object) {

    }

    @Override
    public void delete(Integer id) {

    }

    @Override
    public void delete(String ids) {

    }

    @Override
    public void update(Super object) {

    }

    @Override
    public Super findById(Integer id) {
        return null;
    }

    @Override
    public List<Super> findAll() {
        return null;
    }

    @Override
    public PageInfo<Super> findPage(int pageNum, int pageSize) {
        return null;
    }

    @Override
    public Super checkLogin(String name,String password) {
        Super superx = superMapper.checkLogin(name, password);
        return superx;
    }

    //验证增加管理员用户名重不重复
    @Override
    public Boolean checkAdminName(String name) {
        return superMapper.checkAdminName(name);
    }

    //增加管理员
    @Override
    public void addAdmin(String name, String password) {
        superMapper.addAdmin(name, password);
    }
}
